package com.webapp.org.runner;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.*;


import com.webapp.org.bean.CategoryBean;
import com.webapp.org.interfaces.ICategory;


public class App {
	public static void main(String[] args) throws Exception {

		ApplicationContext appContext = new ClassPathXmlApplicationContext("Spring-Customer.xml");

		//CustomerBo customer = (CustomerBo) appContext.getBean("customerBo");
		 
		 
		//customer.addCustomer();
		
		//customer.addCustomerReturnValue();
		
		//customer.addCustomerThrowException();
		
		//customer.addCustomerAround("mkyong");
      
		CategoryBean categoryBean = new CategoryBean();
		categoryBean.setCategoryName("asa");
		
		ICategory categoryService = (ICategory) appContext.getBean("CategoryService");
		boolean result = categoryService.insertCategory(categoryBean);
	   System.out.println("result------------"+result);
	}
}